<template>
  <div>
    <van-tree-select
        v-model:active-id="activeId"
        v-model:main-active-index="activeIndex"
        :items="items"
        @click-item="get_data()"
    />
  </div>
</template>

<script>
import { ref } from 'vue';

export default {
name: "left",
  data() {
    return {
      items: [{
        text: '组织用户',
        children: [
          {text: '组织管理', id: 1},
          {text: '用户管理', id: 2},
          {text: '职务管理', id: 3},
          {text: '岗位管理', id: 4},
        ]}],
      activeId:ref(1),
      activeIndex:ref()
    }
  },
  methods: {
    get_data:function(){
      console.log('551')
      // console.log(this.activeId)
      this.$emit('id',this.activeId)
    }
  },
  mounted() {

  }
}
</script>

<style scoped>

</style>
